<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('dicdatas', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('字典名称');
            $table->string('value')->comment('字典值');
            $table->string('typeCode')->comment('字典类型');
            $table->string('tagtype')->nullable()->default('primary')->comment('tag类型');
            $table->unsignedInteger('order')->nullable()->comment('排序');
            $table->string('description')->nullable()->comment('描述');
            $table->integer('status')->comment('状态 1/正常 0/禁用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('dicdatas');
    }
};
